Data Grid

Populate GridView with Your Own Database Stored Procedures

Code Customization
Populate GridView with Your Own Database Stored Procedures (Not Applicable To Mobile)
Description:

This customization calls your own stored procedures to get a list of records to populate a ASP.NET GridView control. In this example, you will add the GridView to the bottom of a table control.

This customization will be added in:

..\<Application Name>\<Table Name>\Show<Table Name>Table.aspx.vb

For example: C:\MyApp1\Customers\ShowCustomersTable.aspx.vb

Procedure:

Step 1:  In Iron Speed Designer, switch to Layout Editor then select a table control.

Step 2:  Highlight any desired empty cell at the bottom of the table control.

Step 3:  Add the following HTML code to the cell using Cell Editor.

<asp:GridView ID="MyGrid" runat="server"  OnPageIndexChanging="gridView_PageIndexChanging" bordercolor="Silver" borderstyle="Solid" borderwidth="1px" cellpadding="5" cellspacing="1" cssclass="ttc" forecolor="Silver" horizontalalign="Left" allowpaging="True" pageindex="1">
	<PagerSettings LastPageImageUrl="~/Images/arrow_end.gif" PreviousPageImageUrl="~/Images/arrow_left.gif" FirstPageImageUrl="~/Images/arrow_beg.gif" Position="Top" NextPageImageUrl="~/Images/arrow_right.gif" Mode="NextPreviousFirstLast"></PagerSettings>
	<RowStyle CssClass="ttc"></RowStyle>
	<SelectedRowStyle CssClass="ttcs"></SelectedRowStyle>
	<PagerStyle CssClass="ttc"></PagerStyle>
	<HeaderStyle CssClass="thc"></HeaderStyle>
</asp:GridView>
		

Step 4:  Use this wizard to add code customization.

Step 5:  In added code customization, specify the name and location of your stored procedure and its parameter list (if any).

Step 6:  Build and run the application.

Disclaimer:
Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.

Terms of Service Privacy Statement